package org.eclipse.football;

import java.util.ArrayList;

public class OffPlayer {
	// Declare private member variables
	private String name;
	private int pass_yds;
	private int pass_tds;
	private int picks;
	private int pass_2pt;
	private int rush_yds;
	private int rush_tds;
	private int rush_2pt;
	private int rec_yds;
	private int rec_tds;
	private int rec_2pt;
	private int fumbles;
	private int ret_tds;
	
	// Define constructor
	public OffPlayer(String name){
		// Set name based off input
		this.name = name;
		
		// Initialize all other member variables to 0
		pass_yds = 0;
		pass_tds = 0;
		picks = 0;
		pass_2pt = 0;
		rush_yds = 0;
		rush_tds = 0;
		rush_2pt = 0;
		rec_yds = 0;
		rec_tds = 0;
		rec_2pt = 0;
		fumbles = 0;
		ret_tds = 0;
	}
	
	// Getters
	public String getName() {
		return name;
	}



	public int getPass_yds() {
		return pass_yds;
	}



	public int getPass_tds() {
		return pass_tds;
	}



	public int getPicks() {
		return picks;
	}



	public int getPass_2pt() {
		return pass_2pt;
	}



	public int getRush_yds() {
		return rush_yds;
	}



	public int getRush_tds() {
		return rush_tds;
	}




	public int getRush_2pt() {
		return rush_2pt;
	}



	public int getRec_yds() {
		return rec_yds;
	}



	public int getRec_tds() {
		return rec_tds;
	}



	public int getRec_2pt() {
		return rec_2pt;
	}


	
	public int getFumbles() {
		return fumbles;
	}
	
	
	
	public int getRet_tds() {
		return ret_tds;
	}

	// Setters
	public void setName(String name) {
		this.name = name;
	}



	public void setPass_yds(int pass_yds) {
		this.pass_yds = pass_yds;
	}



	public void setPass_tds(int pass_tds) {
		this.pass_tds = pass_tds;
	}



	public void setPicks(int picks) {
		this.picks = picks;
	}



	public void setPass_2pt(int pass_2pt) {
		this.pass_2pt = pass_2pt;
	}



	public void setRush_yds(int rush_yds) {
		this.rush_yds = rush_yds;
	}



	public void setRush_tds(int rush_tds) {
		this.rush_tds = rush_tds;
	}



	public void setRush_2pt(int rush_2pt) {
		this.rush_2pt = rush_2pt;
	}



	public void setRec_yds(int rec_yds) {
		this.rec_yds = rec_yds;
	}



	public void setRec_tds(int rec_tds) {
		this.rec_tds = rec_tds;
	}



	public void setRec_2pt(int rec_2pt) {
		this.rec_2pt = rec_2pt;
	}



	public void setFumbles(int fumbles) {
		this.fumbles = fumbles;
	}
	
	
	
	public void setRet_tds(int ret_tds) {
		this.ret_tds = ret_tds;
	}

	
	
	
	// Define function to calculate points for this player
	public int calculatePoints(){
		// Initialize sum to 0
		int sum = 0;
		
		// Add points for passing stats
		sum += pass_yds/25;
		sum += 4*pass_tds;
		sum -= 2*picks;
		sum += 2*pass_2pt;
		
		// Add points for rushing stats
		sum += rush_yds/10;
		sum += 6*rush_tds;
		sum += 2*rush_2pt;
		
		// Add points for receiving stats
		sum += rec_yds/10;
		sum += 6*rec_tds;
		sum += 2*rec_2pt;
		
		// Add points for miscellaneous stats
		sum += 6*ret_tds;
		sum -= 2*fumbles;
	
		// Return sum
		return sum;
	}
}
